<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk">

<f:view>
<f:loadBundle var="messages" basename="messages"/>

<head>
    <title>#{messages['conteudoList.title']}</title>
    <style type="text/css">
        @import url(#{facesContext.externalContext.requestContextPath}/styles/myfaces.css);
    </style>
<style type="text/css">
.conteudo {
	color: black;
	font-weight: bold;
	font-style: oblique;
}
</style>
</head>

<h:form id="editConteudo">
<!--<h:commandButton value="Add Conteudo" action="add" id="add" immediate="true" styleClass="button"/> -->
<h:dataTable id="conteudos" var="conteudo" style="margin-top: 10px"
    value="#{conteudoList.conteudos}" rows="25" sortColumn="#{conteudoList.sortColumn}"
    sortAscending="#{conteudoList.ascending}" styleClass="scrollerTable table"
    headerClass="standardTable_Header" rowClasses="standardTable_Row1,standardTable_Row2"
    columnClasses="standardTable_Column,standardTable_Column,standardTable_Column,standardTable_Column,standardTable_ColumnCentered">
	<h:column>
		<div class="conteudo"><!-- <img class="capaNoticia"
			src="images/usuario/Heuler.jpg" /> -->
		<div class="metadadosNoticia">				
		:::<h:outputText style = "font-size:14px;" value="#{conteudo.titulo}" />:::<br/>
		Descricao do Conteudo: 
		<h:outputText value=" #{conteudo.descricao}" /><br/>
		Data de Postagem: 
		<h:outputText value=" #{conteudo.dataCriacao}" >
			<f:convertDateTime dateStyle = "short" type = "date"/>			
		</h:outputText></div>
		</div>
		<div>
		<h:commandLink action="#{conteudoForm.edit}">
		<h:graphicImage  style="border:0px;" value="images/botao_alterar.jpg"/>
			<f:param name="id" value="#{conteudo.id}" />
		</h:commandLink>Alterar					
		</div>		
	</h:column>
</h:dataTable>
	<h:commandButton value="Novo Conteudo" action="add" id="add"
		immediate="true" styleClass="button" />
			
<!-- Error from this table is caused by http://issues.apache.org/jira/browse/TOMAHAWK-466 -->

<ui:include src="/tableFooter.xhtml">
    <ui:param name="tableName" value="conteudos"/>
</ui:include>

<script type="text/javascript">
    highlightTableRows("editConteudo:conteudos");
</script>
</h:form>

</f:view>
</html>
